home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / util / misc / Skimmer.lha / Skimmer / Install Skimmer next >
Text File  |  1998-10-15  |  5KB  |  234 lines

  1. ; $VER: Install-Script for Skimmer 1.37
  2.  
  3. (set SkimmerVer 1)
  4. (set SkimmerRev 37)
  5. (set dest-dir @default-dest)
  6.  
  7. (welcome
  8.    (cat "This is the installer for the fabulous evaluation version of Skimmer "
  9.         SkimmerVer"."SkimmerRev". Follow the instructions and nothing can "
  10.         "go wrong. :-)"
  11.    )
  12. )
  13.  
  14. ; Check installer version
  15.  
  16. (set ver @installer-version)
  17. (set ver (/ ver 65536))
  18.  
  19. (if
  20.    (< ver 43)
  21.    (
  22.       (abort
  23.          (cat "This installer script requires V43 of the Amiga Installer. "
  24.               "You can find this version on AmiNet if you do not already "
  25.               "have it."
  26.          )
  27.       )
  28.    )
  29. )
  30.  
  31. ; check for workbench 2.1
  32.  
  33. (if (NOT (exists "libs:locale.library"))
  34.    (Abort
  35.      "Skimmer requires KickStart 2.1 (v38) or later."
  36.    )
  37. )
  38.  
  39. ; select destination directory
  40.  
  41. (set dest-dir
  42.    (askdir
  43.       (prompt "Please specify where you would like Skimmer to be installed. "
  44.               "A new directory called SKIMMER will be created there."
  45.       )
  46.  
  47.       (Help "The new directory created will be Skimmer's \"home\" where "
  48.             "it, its help files, and most support files will be kept."
  49.       )
  50.  
  51.       (default dest-dir)
  52.       (NewPath)
  53.       (Disk)
  54.    )
  55. )
  56.  
  57. (set dest-dir
  58.    (tackon dest-dir "Skimmer")
  59. )
  60.  
  61. ; Should we install ReqTools?
  62.  
  63. (set ver (getversion "reqtools.library" (resident)))
  64. (set ver (/ ver 65536))
  65.  
  66. (if
  67.    (= ver 0)
  68.    (
  69.       (set ver (getversion "libs:reqtools.library"))
  70.       (set ver (/ ver 65536))
  71.    )
  72. )
  73.  
  74. (if
  75.    (= ver 0)
  76.    (set InstallReqTools 1)
  77.    (set InstallReqTools 0)
  78. )
  79.  
  80. (if
  81.    (< ver 38)
  82.    (set InstallReqTools 1)
  83.    (set InstallReqTools 0)
  84. )
  85.  
  86. (if
  87.    (= InstallReqTools 1)
  88.    (set OK2Install
  89.       (AskBool
  90.          (prompt
  91.             (cat  "You are either using an obsolete version of ReqTools "
  92.                   "or you do not have it installed. Skimmer requires the "
  93.                   "use of ReqTools.library to operate. Would you like to "
  94.                   "install reqtools.library?"
  95.             )
  96.          )
  97.          (help
  98.             (cat  "If you choose \"YES\", the installer will copy "
  99.                   "reqtools.library to your LIBS: directory. If you "
  100.                   "choose \"NO\", the installer will abort."
  101.             )
  102.          )
  103.          (default 0)
  104.       )
  105.    )
  106. )
  107.  
  108. (if
  109.    (= InstallReqTools 1)
  110.    (if
  111.       (= OK2Install 1)
  112.       (set InstallReqTools 1)
  113.       (abort "Cannot use Skimmer without ReqTools!")
  114.    )
  115. )
  116.  
  117. ; copy contents of the directory over to the destination
  118.  
  119. (copyfiles
  120.    (prompt
  121.       (cat  "The installer will now copy all relevant files to the destination "
  122.             "directory that you chose earlier. A directory called SKIMMER will "
  123.             "be created for you."
  124.       )
  125.    )
  126.    (help
  127.       (cat  "You earlier chose a destination for Skimmer to be installed to. "
  128.             "A directory called SKIMMER will be created there. The program, "
  129.             "help files, and so on will be copied there for you."
  130.       )
  131.    )
  132.    (source "InstallMe")
  133.    (dest dest-dir)
  134.    (all)
  135.    (files)
  136.    (infos)
  137.    (noposition)
  138. )
  139.  
  140. ; copy reqtools.library if it does not already exist in the current version
  141.  
  142. (if
  143.    (= InstallReqTools 1)
  144.    (copylib
  145.       (prompt
  146.          (cat  "The installer will now copy reqtools.library to your LIBS: "
  147.                "directory."
  148.          )
  149.       )
  150.       (help
  151.          (cat  "You earlier indicated that you wished the most recent version "
  152.                "of reqtools.library to be installed for you. Skimmer requires "
  153.                "this library in order to function properly."
  154.          )
  155.       )
  156.       (source "InstallLibs/reqtools.library")
  157.       (dest "Libs:")
  158.    )
  159. )
  160.  
  161.  
  162. (set dest-dir "Locale:Catalogs")
  163.  
  164. (set LangChoice
  165.    (AskOptions
  166.       (prompt "Which languages (besides English) would you like to install?")
  167.       (help (cat  "Skimmer is fully localized, meaning that it can 'speak' "
  168.                   "to you in your native language, provided a 'translation' "
  169.                   "has been provided. English is used by default. If you "
  170.                   "speak a language other than English, and that language is "
  171.                   "available in the choices displayed to you, select it. "
  172.                   "You can select other languages as well."
  173.             )
  174.       )
  175. ;                 1          2           4
  176.       (Choices "Deutsch" "Français" "Italiano")
  177.       (default 0)
  178.    )
  179. )
  180.  
  181. (if
  182.    (BITAND LangChoice 1)
  183.    (
  184.       (set lang-dir
  185.          (tackon dest-dir "Deutsch")
  186.       )
  187.  
  188.       (copyfiles
  189.          (source "locale/skimmer.deutsch")
  190.          (dest lang-dir)
  191.          (newname "Skimmer.catalog")
  192.          (files)
  193.          (nogauge)
  194.       )
  195.    )
  196. )
  197.  
  198. (if
  199.    (BITAND LangChoice 2)
  200.    (
  201.       (set lang-dir
  202.          (tackon dest-dir "Français")
  203.       )
  204.  
  205.       (copyfiles
  206.          (source "locale/skimmer.français")
  207.          (dest lang-dir)
  208.          (newname "Skimmer.catalog")
  209.          (files)
  210.          (nogauge)
  211.       )
  212.    )
  213. )
  214.  
  215. (if
  216.    (BITAND LangChoice 4)
  217.    (
  218.       (set lang-dir
  219.          (tackon dest-dir "Italiano")
  220.       )
  221.  
  222.       (copyfiles
  223.          (source "locale/skimmer.italiano")
  224.          (dest lang-dir)
  225.          (newname "Skimmer.catalog")
  226.          (files)
  227.          (nogauge)
  228.       )
  229.    )
  230. )
  231.  
  232.  
  233. (exit "Installation is complete!" (quiet))
  234.